More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard

A* Short Path Algorithm Interactive Task

Finding the shortest route between two places might sound like a simple task, but when a network contains hundreds or even millions of possible paths, computers need an efficient way to decide which route to follow. This is where search algorithms come in.

You may already have explored Dijkstra’s Shortest Path Algorithm, which guarantees finding the shortest path by systematically examining the graph. While Dijkstra’s algorithm is very reliable, it can sometimes spend time investigating routes that clearly lead away from the destination.

The A* (pronounced “A star”) algorithm improves on this idea by introducing a heuristic — an estimate of how far each node is from the destination. Instead of only considering the distance already travelled, A* also takes into account the estimated distance remaining. At each step, it chooses the node with the lowest combined value:

Total Cost = Distance from the Start + Estimated Distance to the Goal

By using this extra information, A* can focus its search towards the target instead of exploring every possible direction. In many real-world situations, this makes it significantly faster than Dijkstra’s algorithm while still guaranteeing the shortest path, provided the heuristic never overestimates the remaining distance.

Because of its efficiency, A* is one of the world’s most widely used pathfinding algorithms. It powers route-planning software, satellite navigation systems, robotics, video games, artificial intelligence, warehouse automation, and many other applications where computers need to navigate efficiently through complex environments.

In this interactive activity, you will practise applying the A* algorithm to a series of weighted directed graphs. For each challenge, use the heuristic values shown on the graph to calculate the total cost for each node, complete the A* table step by step, and determine the shortest path and its total distance. Compare your answers with the worked solution to build confidence in using one of the most important search algorithms in computer science.
A* Short Path AlgorithmOpen this activity in a New Window

Dijkstra Short Path Algorithm Interactive Task

Every time you use a sat nav, plan a journey on a map app, or search for the fastest route across a transport network, you are using ideas from graph theory. A road map can be represented as a graph: towns, junctions or stations are nodes, and the roads, railways or paths between them are edges. If each edge has a value, such as distance, time or cost, we can use an algorithm to find the shortest route.

One of the most famous algorithms for solving this problem is Dijkstra’s Shortest Path Algorithm. It was created in 1956 by Dutch computer scientist Edsger W. Dijkstra. The story goes that Dijkstra came up with the algorithm while sitting in a café in Amsterdam, trying to find an elegant way to calculate the shortest route between two cities. He later said that he designed it in about twenty minutes, without even using pencil and paper!

The algorithm works by starting at one node and gradually building up the shortest known distance to every other node in the graph. At each step, it chooses the unvisited node with the smallest temporary distance, marks it as visited, and updates the distances to its neighbouring nodes. By repeating this process, the algorithm eventually finds the shortest path from the starting node to the destination.

Dijkstra’s Algorithm is still important today. It has influenced route-planning systems, network routing, robotics, logistics, games, and many other areas of computer science. It is also a great example of how a problem can be solved by breaking it down into clear, repeatable steps.

In this interactive activity, you will practise applying Dijkstra’s Algorithm to a range of different weighted directed graphs. For each challenge, study the graph carefully, complete the table step by step, and identify the shortest path and total distance from the starting node to the target node. Use the check button to test your answers and improve your understanding of how the algorithm works.

Dijkstra Short Path AlgorithmOpen this activity in a New Window

Vector Based Graphics Editor

Not every digital image is stored as a collection of coloured pixels. While photographs and pixel art are usually saved as bitmap images, many logos, icons, maps and illustrations are created using a completely different method called vector graphics.

Instead of storing the colour of every individual pixel, a vector graphic is made up of mathematical objects such as lines, rectangles, circles, triangles and curves. Each object is stored as a set of instructions describing its position, size, colour, outline and other properties. This means the computer recreates the image by drawing these shapes whenever it is displayed.

One of the biggest advantages of vector graphics is that they can be scaled to any size without losing quality. Whether a logo is printed on a business card or stretched across a giant billboard, it remains perfectly sharp because the computer simply redraws the shapes using the stored mathematical instructions. In contrast, enlarging a bitmap image eventually reveals the individual pixels, making the picture appear blurry or blocky.

Our interactive Vector Graphics Simulator lets you explore these ideas by creating your own vector artwork from simple shapes. Add rectangles, circles, triangles and lines, then experiment with changing their size, position, colours, rotation and layering. You can drag objects around the canvas, resize them, reorder them and instantly see how the generated SVG (Scalable Vector Graphics) code changes to describe your drawing.

As you experiment, compare your experience with creating bitmap images. Rather than editing individual pixels, you’ll be editing the properties of objects and discovering how a complete image can be represented using just a small collection of mathematical instructions. You’ll also see why vector graphics often produce much smaller files for simple illustrations and why they are widely used for company logos, diagrams, technical drawings, maps, icons and user interface graphics.

Vector Graphics EditorOpen Editor in a New Window

Bitmap Image Simulator

Every photo, icon, emoji and piece of pixel art you see on a computer has to be stored digitally. But have you ever wondered how a computer can save an image using nothing more than 1s and 0s?

One of the most common ways of storing images is as a bitmap. A bitmap image is made up of thousands (or even millions) of tiny coloured squares called pixels. Each pixel stores a numerical value that represents its colour, and together these pixels combine to create the picture you see on the screen.

The quality of a bitmap image depends on two important factors. Resolution is the number of pixels used to create the image. A higher resolution contains more pixels, allowing the picture to show finer detail, but it also increases the amount of data that must be stored. Colour depth determines how many bits are used to store the colour of each pixel. A greater colour depth allows many more colours to be represented, producing smoother and more realistic images, but again increases the file size.

Bitmap images also contain metadata. This is information about the image rather than the picture itself. Metadata can include the image width and height, the colour depth, the file format and, depending on the file type, additional information such as the date the image was created, the device used to capture it or even the author’s details.

Our interactive Bitmap Image Storage Simulator lets you explore these ideas for yourself. Choose from a selection of classic pixel-art sprites or create your own image by colouring individual pixels. Experiment with different resolutions and colour depths, watch the binary data that is generated for every pixel, investigate how the file size changes, and discover the metadata that must be stored alongside the image.

Bitmap Image SimulatorOpen Simulator in a New Window

Sound Sampling Simulator

Have you ever wondered how your computer or smartphone stores music, podcasts or voice recordings? Although sound travels through the air as a continuous (analogue) wave, computers can only store digital data made up of 1s and 0s. So how does a smooth sound wave become a digital audio file?

The answer lies in a process called sound sampling. During sampling, the computer measures the height (amplitude) of the sound wave at regular intervals. These measurements are then rounded to the nearest value that can be stored using a fixed number of bits. The two most important factors that affect the quality of the recording are the sample rate (how often the sound is measured) and the bit depth (how many different amplitude values can be stored). Higher sample rates and greater bit depths produce more accurate recordings, but they also create much larger files.

Our interactive Sound Sampling Simulator lets you explore this process step by step. Watch a smooth analogue sound wave being sampled, see how the measurements are converted into digital values, examine the binary data that is generated, and discover how changing the sample rate or bit depth affects both the quality of the recording and the final file size.

Experiment with different settings, compare low-quality and high-quality recordings, and see for yourself the trade-off between sound quality and storage space. By the end of the activity, you’ll have a much better understanding of how digital audio is created and why these concepts are so important in Computer Science.

Sound Sampling SimulatorOpen Simulator in a New Window

Interactive Trace Table Challenge

Put your programming skills to the test with this interactive Trace Table Challenge! Whether you’re learning to code or preparing for your GCSE Computer Science exams, trace tables are one of the most useful techniques for understanding exactly how an algorithm works.

A trace table lets you follow a program one line at a time, recording how the values of variables change as each instruction is executed. By tracing an algorithm step by step, you can predict the program’s output, spot logical errors before writing any code, and develop a much deeper understanding of sequencing, selection (IF statements) and iteration (FOR and WHILE loops).

This interactive activity contains a series of progressively more challenging algorithms. Your task is to complete the trace table by recording the values of variables, the results of conditions and any output produced by the program. If you get stuck, you can watch the built-in animation to see the algorithm execute line by line before having another go yourself.

Trace Table ChallengesOpen Quiz in a New Window

CSS Code Builder

Put your knowledge of the main CSS selectors and properties to the test with this interactive CSS Selector & Property Builder! Complete a series of drag-and-drop challenges to demonstrate your skills in styling HTML web pages using CSS. Choose the most appropriate selectors to target elements on the page and match them with the correct CSS properties to achieve the required formatting. With instant feedback, a live preview and the HTML code displayed alongside each challenge, this activity is a fun and engaging way to practise the essential CSS skills needed to create attractive and well-designed websites.

CSS Code BuilderOpen Quiz in a New Window

HTML Tag Builder

Put your knowledge of the main HTML tags to the test with this interactive HTML Tag Builder! Complete a series of drag-and-drop challenges to demonstrate your skills in building the HTML code needed to create basic web pages. Practise using headings, paragraphs, hyperlinks, images, lists, tables and form controls such as text boxes, checkboxes, radio buttons and drop-down lists. With instant feedback and a live preview of the web page you’re creating, this activity is a fun and engaging way to learn and revise the fundamental building blocks of HTML.

HTML Tag BuilderOpen Quiz in a New Window

SQL Query Builder

Put your SQL skills to the test with this interactive SQL Query Builder! In this challenge, you will practise constructing SQL statements by selecting the correct clauses to retrieve or manipulate data stored in database tables. Work your way through a range of SELECT, UPDATE, DELETE and INSERT queries, choosing the correct SQL syntax from a set of possible options. As you build each query, you will receive instant feedback to help you spot and correct mistakes, making this a fun and effective way to revise SQL for GCSE and A Level Computer Science and beyond.

SQL Query BuilderOpen Quiz in a New Window

GCSE Computer Science Definition Builder

Learning the key terminology is an essential part of success in GCSE Computer Science. This interactive Definition Builder challenge helps students revise important keywords by asking them to reconstruct definitions one phrase at a time. Simply drag each definition card into the correct order and receive instant feedback on your answers. Choose to focus on a specific topic, such as Computer Hardware, Networks or Programming Concepts, or test yourself with the Mix All Categories option for the ultimate revision challenge. Whether you’re preparing for an assessment or revising for your GCSE exams, this activity is a fun and engaging way to strengthen your understanding of Computer Science vocabulary.

GCSE Computer Science – Definition BuilderOpen Quiz in a New Window